package com.frxuexi.park2209.sign

import com.frxuexi.base.mvvm.BaseViewModel
import com.frxuexi.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import javax.inject.Inject

@HiltViewModel
class SignViewModel @Inject constructor(val apiService: ApiService):BaseViewModel() {
    var signSuc = MutableStateFlow<String>("")

    var getsignSuc = MutableStateFlow<String>("")

    fun sign(map: Map<String,Any>){
        httpRequest({apiService.sign(mapToBody(map))},{signSuc.value =it})
    }

    fun getSigns(map: Map<String, Int>){
        httpRequest({apiService.getSigns(mapToBody(map))},{getsignSuc.value=it})
    }
}